import Vue from 'vue'
import VueRouter from 'vue-router'
import PageIndex from "../views/index"
import EchartPage from "../views/echarts"
import rulerPage from "../views/ruler"
import rule2Page from "../views/ruler2"
import dragPage from "../views/drag"
import splitPage from "../views/split";
import threePage from "../views/three";
import openlayersPage from "../views/openlayers";
import mapIndex from "../views/openlayer/index"
import ext2 from "../views/openlayer/ext2"
import leafletPage from "../views/leaflet";
import ext1Leaft from "../views/leaflet/index"
import ext2Leaft from "../views/leaflet/ex2"
import editorPage from "../views/openlayer/editor";
import cesiumPage from "../views/cesium";
import borderPage from "../views/border"
import demoIndex from "../views/demoIndex";
import sam1Page from "../views/samples/sam1";
import unityPage from "../views/unity";

import sam2 from "../views/samples/fullsample";

Vue.use(VueRouter);


export default new VueRouter({
    routes: [
        {
            path: '/', component: PageIndex
        },
        {
            path: '/demo', component: demoIndex, children: [
                {path: "", component: EchartPage},
                {path: "echarts", component: EchartPage},
                {path: "ruler", component: rulerPage},
                {path: "ruler2", component: rule2Page},
                {path: "drag", component: dragPage},
                {path: "split", component: splitPage},
                {path: "three", component: threePage},
                {
                    path: "openlayers", component: openlayersPage, children: [
                        {path: "", component: mapIndex},
                        {path: "ex1", component: mapIndex},
                        {path: "ex2", component: ext2},
                        {path: "editor", component: editorPage},

                    ]
                },
                {
                    path: "leaflet", component: leafletPage, children: [
                        {path: "", component: ext1Leaft},
                        {path: "ex1", component: ext1Leaft},
                        {path: "ex2", component: ext2Leaft},
                    ]
                }
            ]
        },
        {path: "/cesium", component: cesiumPage},
        {path: "/border", component: borderPage},
        {
            path: "/samples/sam1", component: sam1Page
        },
        {path: "/unity", component: unityPage},
        {
            path: "/samples/sam2", component: sam2
        },


    ]
});